/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package MainPackage.Views;

import MainPackage.MainWindow;
import java.io.*;

/**
 *
 * @author d.chauvistre
 */
public class HilfeView extends javax.swing.JDialog {

    /**
     * Creates new form Hilfe
     */
    public HilfeView(java.awt.Frame parent, boolean modal) {
        super(parent, modal);
        initComponents();

        InputStream stream = MainWindow.class.getResourceAsStream("/ConfigFiles/Hilfe");
        if (stream != null) {
            InputStreamReader reader = new InputStreamReader(stream);
            try {
                String content = "";
                int x = reader.read();
                int id = 0;
                while (x != -1) {
                    content += (char) x;
                    x = reader.read();
                }
                this.text.setText(content);


            } catch (IOException e) {
                System.out.println("Fehler");
            }
        }
    }

    /**
     * This method is called from within the constructor to initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is always
     * regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        schliessen = new javax.swing.JButton();
        jScrollPane1 = new javax.swing.JScrollPane();
        text = new javax.swing.JTextArea();

        setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);

        schliessen.setText("Schließen");
        schliessen.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                schliessenActionPerformed(evt);
            }
        });

        text.setColumns(20);
        text.setRows(5);
        text.setCursor(new java.awt.Cursor(java.awt.Cursor.TEXT_CURSOR));
        jScrollPane1.setViewportView(text);

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(layout.createSequentialGroup()
                        .addComponent(jScrollPane1)
                        .addContainerGap())
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                        .addGap(0, 243, Short.MAX_VALUE)
                        .addComponent(schliessen)
                        .addGap(233, 233, 233))))
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 333, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 12, Short.MAX_VALUE)
                .addComponent(schliessen)
                .addContainerGap())
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void schliessenActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_schliessenActionPerformed
        this.setVisible(false);
    }//GEN-LAST:event_schliessenActionPerformed

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JButton schliessen;
    private javax.swing.JTextArea text;
    // End of variables declaration//GEN-END:variables
}
